#ifndef VMM_H
#define VMM_H

#define PMM_STACK_ADDRESS 0xFF000000

#define PAGE_DIR_VIRTUAL_ADDR	0xFFFFF000
#define PAGE_TABLE_VIRTUAL_ADDR	0xFFC00000
#define PAGE_DIR_IDX(x) ((unsigned int)x/1024)
#define PAGE_TABLE_IDX(x) ((unsigned int)x%1024)
#define KERNEL_DIRECTORY 0xFF000000
#define PAGE_PRESENT	0x1
#define PAGE_WRITE		0x2
#define PAGE_USER		0x4
#define PAGE_WRITETHROUGH 0x8
#define PAGE_NOCACHE	0x10
#define PAGE_ACCESSED	0x20
#define PAGE_AVAIL1		0x200
#define PAGE_AVAIL2		0x400
#define PAGE_AVAIL3		0x800
#define PAGE_MASK		0xFFFFF000
#define FLAG_MASK		0xFFF

#define TMP_SRC		0xEF000000
#define TMP_DEST	0xEF001000
#define TMP_PAGE_S	0xEF002000
#define TMP_PAGE_D	0xEF003000
#define TMP_TABLE_S	0xEF004000
#define TMP_TABLE_D	0xEF005000
#define TMP_PD		0xEF006000

typedef unsigned int page_directory_t;

char pmm_paging_active;

page_directory_t *current_directory;
page_directory_t *kernel_directory;

#endif /* end of include guard: VMM_H */
